package com.penglecode.dp.creational.factory.general;

import com.penglecode.dp.creational.MailSender;
import com.penglecode.dp.creational.Sender;
import com.penglecode.dp.creational.SmsSender;

/**
 * 多工厂方法模式
 * 
 * @author pengpeng
 * @date 2013-5-14上午10:16:38
 * @version 1.0
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
public class MultiMethodFactory {

	public Sender createMailSender(){
		return new MailSender();
	}
	
	public Sender createSmsSender(){
		return new SmsSender();
	}
	
	public static void main(String[] args) {
		MultiMethodFactory factory = new MultiMethodFactory();
		Sender sender = factory.createSmsSender();
		sender.sendMessage();
	}
	
}
